package com.itkaien.factory;

import com.itkaien.service.UserService;
import com.itkaien.service.impl.UserServiceimpl;
import org.springframework.beans.factory.FactoryBean;

public class MyFactory implements FactoryBean<UserService> {
    @Override
    public UserService getObject() throws Exception {
        System.out.println("工厂类创建对象");
        return new UserServiceimpl();
    }

    @Override
    public Class<?> getObjectType() {
        return UserServiceimpl.class;
    }
}
